/**
@brief Some hardware configuration.
*/

#ifndef OPTICALCAR_HARDWARE_H__
#define OPTICALCAR_HARDWARE_H__

#include "OpticalCar_platform.h"


#define PORT_LED_PWR GPIOB          // GPIO port for LED Power
#define PIN_LED_PWR  GPIO_Pin_12    // GPIO pin for LED Power

// ===== Hardware configuration for PWM output ====
#define PORT_PWM_A GPIOA
#define PIN_PWM_A1 GPIO_Pin_6       // TIM3 Channel 1, 2
#define PIN_PWM_A2 GPIO_Pin_7
#define PORT_PWM_B GPIOB
#define PIN_PWM_B1 GPIO_Pin_1       // TIM3 Channel 4, 3
#define PIN_PWM_B2 GPIO_Pin_0


// ===== Hardware configuration for Soft IIC =====
#define RCC_SCL1    RCC_APB2Periph_GPIOA
#define RCC_SDA1    RCC_APB2Periph_GPIOB
#define RCC_SCL2    RCC_APB2Periph_GPIOB
#define RCC_SDA2    RCC_APB2Periph_GPIOB

#define PORT_IIC_SCL1  GPIOA
#define PIN_IIC_SCL1   GPIO_Pin_15
#define PORT_IIC_SDA1  GPIOB
#define PIN_IIC_SDA1   GPIO_Pin_3

#define PORT_IIC_SCL2  GPIOB
#define PIN_IIC_SCL2   GPIO_Pin_4
#define PORT_IIC_SDA2  GPIOB
#define PIN_IIC_SDA2   GPIO_Pin_5



void Car_HardwareInit(void);


#endif  // OPTICALCAR_HARDWARE_H__
